﻿//************************************************************************************************
// Copyright © 2012 Steven M. Cohn. All Rights Reserved.
//
//************************************************************************************************

namespace CookieChipper
{
	using System;


	/// <summary>
	/// The index.dat URL record contains a 4-byte integer at offset 64 indicating the usage
	/// and attributes of the record.  For our use, we should look for "Normal|Cookie" records.
	/// </summary>

	[Flags]
	internal enum CacheFlags
	{
		/// <summary>
		/// normal cache entry; can be deleted to recover space for new entries.
		/// </summary>

		Normal = 0x00000001,


		/// <summary>
		/// Unknown
		/// </summary>

		Stable = 0x00000002,


		/// <summary>
		/// sticky cache entry that is exempt from scavenging for the amount of time specified
		/// by release (exempt) delta. The default value set by the function CommitUrlCacheEntry
		/// is one day. Has extended flags (unknown value at offset 40): 0x00004008?
		/// </summary>
		
		Sticky = 0x00000004,


		/// <summary>
		/// Cache entry file that has been edited externally. This cache entry type is exempt
		/// from scavenging. Set for iecompat: and ietld:
		/// </summary>
		
		Edited = 0x00000008,

		
		/// <summary>
		/// Not currently implemented.
		/// </summary>
		
		TrackOffline = 0x00000010,

		
		/// <summary>
		/// Not currently implemented.
		/// </summary>
		
		TrackOnline = 0x00000020,

		
		/// <summary>
		///  Is cached/cache-able? Not set if header contains “Pragma: no-cache” or
		/// other cache related headers are present
		/// </summary>
		
		Cacheable = 0x00000040,

		
		/// <summary>
		///  HTTP request method, 0 => GET, 1 => POST
		/// </summary>
		
		Post = 0x00001000,

		
		/// <summary>
		/// Partial response cache entry.
		/// </summary>
		
		Sparse = 0x00010000,

		
		/// <summary>
		/// OLE Control Extension (OCX) cache entry.  OCX is a predecessor of ActiveX
		/// Set for PrivacIE:
		/// </summary>
		
		OCX = 0x00020000,

		
		/// <summary>
		/// Cookie cache entry.
		/// </summary>
		
		Cookie = 0x00100000,

		
		/// <summary>
		/// Visited link cache entry.
		/// </summary>
		
		History = 0x00200000
	}
}
